package org.gd.hellospring.simple;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

@Repository("annotateSimpleBean")
public class ASimpleBean implements SimpleDaoLocal {

    private SimpleDaoLocal daoLocal;

    @Autowired
    @Qualifier("simpleDao")
    public void setDaoLocal(SimpleDaoLocal daoLocal) {
        this.daoLocal = daoLocal;
    }

    @Override
    public SimpleUser getUser() {
        return daoLocal.getUser();
    }

    @Override
    public void deleteUser() {
        daoLocal.deleteUser();
    }

    @Override
    public SimpleUser getDefUser() {
        return daoLocal.getDefUser();
    }
}
